package com.longcai.piaojia.activity;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;

import com.longcai.piaojia.BaseApplication;
import com.longcai.piaojia.R;
import com.zcx.helper.app.AppApplication;

/**
 * Created by Administrator on 2016/3/14.
 */
public class WelcomeActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_welcome);

        BaseApplication.INSTANCE.setInitSuccessCallBack(new AppApplication.OnInitSuccessCallBack() {

            @Override
            public void onInitSuccess() {

                new Handler() {

                    @Override
                    public void handleMessage(Message msg) {

                        startVerifyActivity(BaseApplication.BasePreferences.readIsGuide() ? NavigationActivity.class : GuideActivity.class);

                        finish();

                    }

                }.sendEmptyMessageDelayed(0, 3000);

            }

        });

    }

}
